package cn.gx.kevin.domain;

import java.util.Date;

import cn.gx.kevin.common.annotation.*;
import cn.gx.kevin.domain.BaseDomain;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;

/**
 * Generate by Kevin's CodeBuilder
 **/
public class Func extends BaseDomain {


    private static final long serialVersionUID = 3790915180401050327L;
    /**
     * ID
     */
    @ApiParams(value = "id")
    @ExcelIgnore
    private String id;

    /**
     * 菜单ID
     */
    @ApiParams(value = "菜单ID")
    @ExcelIgnore
    private String menuId;

    /**
     * 功能码
     */
    @Require(langKey = "func_Require")
    @Uniquely(langKey = "func_Uniquely", extField = "menuId")
    @NewOldCompare
    @ApiParams(value = "功能码")
    @ExcelProperty(value = "功能码", index = 1)
    private String funcCode;

    /**
     * 功能描述
     */
    @ApiParams(value = "功能描述")
    @ExcelProperty(value = "功能描述", index = 2)
    private String funcDesc;


    /**
     * 是否需要记录日志
     */
    @ApiParams(value = "是否需要记录日志")
    @ExcelIgnore
    private String isLog;

    /**
     * 创建用户ID
     */
    @ExcelIgnore
    private String createUserId;

    /**
     * 创建时间
     */
    @ExcelIgnore
    private Date createTime;

    /**
     * ID
     */
    public String getId() {
        return id;
    }

    /**
     * ID
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 菜单ID
     */
    public String getMenuId() {
        return menuId;
    }

    /**
     * 菜单ID
     */
    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    /**
     * 功能码
     */
    public String getFuncCode() {
        return funcCode;
    }

    /**
     * 功能码
     */
    public void setFuncCode(String funcCode) {
        this.funcCode = funcCode;
    }

    /**
     * 功能描述
     */
    public String getFuncDesc() {
        return funcDesc;
    }

    /**
     * 功能描述
     */
    public void setFuncDesc(String funcDesc) {
        this.funcDesc = funcDesc;
    }

    /**
     * 是否需要记录日志
     */
    public String getIsLog() {
        return isLog;
    }

    /**
     * 是否需要记录日志
     */
    public void setIsLog(String isLog) {
        this.isLog = isLog;
    }

    /**
     * 创建用户ID
     */
    public String getCreateUserId() {
        return createUserId;
    }

    /**
     * 创建用户ID
     */
    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    /**
     * 创建时间
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "id=[" + getId() + "] menuId=[" + getMenuId() + "] funcCode=[" + getFuncCode() + "] funcDesc=[" + getFuncDesc() + "] isLog=[" + getIsLog() + "] createUserId=[" + getCreateUserId() + "] createTime=[" + getCreateTime() + "]";
    }


    @NotApiParam
    @ExcelProperty(value = "是否需要记录日志", index = 3)
    private String isLogText;


    @NotApiParam
    @ExcelProperty(value = "菜单名称", index = 0)
    private String menuText;

    public String getIsLogText() {
        return "1".equals(isLog) ? "是" : "否";
    }

    public String getMenuText() {
        return String.valueOf(this.getExtFeildsMap().get("menuText"));
    }

}
